package com.chenjie.drools.service.impl;

import org.springframework.stereotype.Service;

import com.chenjie.drools.drl.BeanManager;
import com.chenjie.drools.entity.DroolsParam;
import com.chenjie.drools.service.FactService;

@Service
public class FactServiceImpl implements FactService{

	@Override
	public void createBean(DroolsParam droolsParam) {
		 BeanManager beanManager = BeanManager.getInstance();
	     beanManager.create(droolsParam.getBeanName(), null);
	}

	@Override
	public Boolean isExistBean(DroolsParam droolsParam) {
		 BeanManager beanManager = BeanManager.getInstance();
	     return beanManager.isExist(droolsParam.getBeanName());
		
	} 
}
